package com.wj.controller;


import com.wj.service.IMenuService;
import com.wj.utils.RespBean;
import com.wj.utils.UserUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wj
 * @since 2022-05-27
 */
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Resource
    private IMenuService menuService;

    @GetMapping("/")
    public RespBean getMenusByUserId(){
        return menuService.getMenusByUserId(UserUtil.getCurrentUser().getId());
    }
}
